<style type="text/css">
  @import url("./js/nestable/jquery.nestable.css");

  h1 {
      font-size: 1.2em;
      margin: .6em 0;
  }

  .ui-dialog label, .ui-dialog input {
    display: block;
  }
  .ui-dialog input {
    width: 100%;
  }
  .ui-dialog fieldset {
    padding: 0;
    margin: 0;
    border: 0;
  }
  .ui-dialog input.text {
      margin-bottom: 12px;
      width:         95%;
      padding:       .4em;
  }
  .ui-dialog .ui-state-error { padding: .3em; }

  .ui-dialog h2.errorLog {
    margin: 0 0 15px 0;
    color: #AA0004;
    font-size: 1.2em;
    font-weight: bold;
  }
  .ui-widget .form-actions {
    text-align: right;
  }

  *[aria-labelledby="ui-dialog-title-loginFormModal"] {
    width: 364px !important;
  }
  
  *[aria-labelledby="ui-dialog-title-loginFormModal"] input[type="password"]  {
    margin: 20px auto !important;
    width: 90% !important;
  }


</style>

<div class="nestable-lists" class="hidden">
    <div>
        <div style="height: 30px; max-width: 600px">
            <h3 style="float: left">Концепции</h3>
            <button style="float: right" id="addCnc-open" class="btn btn-success" data-action="new" type="button">
                <i class="icon-plus icon-white"></i> Добавить
            </button>
        </div>
        <div class="dd" id="conceptions_list">
            <?php echo Arr::getValue($params, 'list', ''); ?>
        </div>
    </div>
</div>
    
<?php echo includeFile( APP_PAGE_PARTS . 'forms/form_add_conception_.php', array(), true ); ?>









<script type="text/javascript">
    jQuery.getScript("./js/nestable/jquery.nestable.js", function(){

        var d = $('#addCncForm-cont');

        $("#conceptions_list").nestable({
          group:    1,
          maxDepth: 2
        });
        var n = $('.dd');
        n.nestable('collapseAll');
        n.on('change', function(e) {
          d.submit();
        });
        n.nestable('collapseAll');

        $(n).nestable().on('mousedown', function(e){
          var id = $(e.target).parent().data('id');
          $(this).data('post', id);
        });

        $('.nestable-lists').removeClass('hidden');

    });
</script>
